package com.eaoogle.consumer.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.eaoogle.appi.entity.User;
import com.eaoogle.appi.service.IHelloService;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/main")
public class conn {
    @Reference
    IHelloService iHelloService;
    @RequestMapping("/all")
    @ResponseBody
    public List<User> findall(){
        List<User> list=iHelloService.findall();
        return list;
    }
    @RequestMapping("/find")
    @ResponseBody
    public String findall(String name){
        String list=iHelloService.getName(name);
        return list;
    }
    @RequestMapping("/finds")
    @ResponseBody
    public String findalls(String name){
        String list=iHelloService.getName(name);
        return list;
    }
}
